package com.crystal.jcms.utils;

import android.app.ActionBar;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;

public class CustomActionBarUtils {
	public static void setActionBar(Activity activity, String title){
		activity.setTitle(title);
		ActionBar actionBar=activity.getActionBar();
		actionBar.setDisplayHomeAsUpEnabled(true);
		//#51b7f1 蓝色 #f4842d 杏黄色
		actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#51b7f1")));
		actionBar.setSplitBackgroundDrawable(new ColorDrawable(Color.parseColor("#51b7f1")));
	}
}
  